<template>
	<h2>App父级组件:Suspense组件的使用</h2>
	<hr />
	<AsyncComponent />
</template>

<script lang="ts">
import { defineAsyncComponent, defineComponent } from "vue"
// 引入组件：静态引入和动态引入

// Vue2.x的动态引入组件的写法：在Vue3中这种写法不行了！
const AsyncComponent = () => import("./AsyncComponent.vue")
// Vue3中的动态引入组件的写法！
const AsyncComponent = defineAsyncComponent("./AsyncComponent.vue")
export default defineComponent({
	name: "App",
	components: {
		AsyncComponent
	}
})
</script>

<style></style>
